package swim2.sessionbeans;

import java.util.ArrayList;
import javax.ejb.Remote;
import swim2.entitybeans.*;

@Remote
public interface UserSystemRemote {

	public boolean insertAbility(String ability, int userId);
	
	public ArrayList<String> getUserAbilities(int id);
	
	public String getMail (int id);
	
	public String getPassword(int id);
	
	public ArrayList<User> searchUser(String[] s);
	
	public String getCompleteName (int id);
	
	public ArrayList<User> searchUserByAbility(String ability);
	
	public boolean AskForNewAbility(String name, String description, int userId);
	
	public int checkFriendshipRequest(int senderId, int recipientId, int suggested);
	
	public int checkUnreadFriendRequests(int id);
	
	public ArrayList<Integer> getUnreadFriendRequests(int userId);
	
	public String getSender(int reqId);
	
	public int getSenderId(int reqId);
	
	public int getRecipientId(int reqId);
	
	public void insertFriendship(int reqId);
	
	public void deleteFriendRequest(int reqId);
	
	public ArrayList<Integer> getNewFriendships(int userId);
	
	public ArrayList<Integer> getFriendsId(int userId);
	
	public boolean insertWorkRequest(int sender, String title, String ability, String Description);
	
	public ArrayList<WorkRequest> getMyWorkRequest(int id);
	
	public WorkRequest getWorkRequest(int wr);
	
	public ArrayList<User> getWorkers(int wr);
	
	public void DeleteWorkRequest(int id);
	
	public ArrayList<WorkRequest> getWorkRequestByAbility(String ability);
	
	public boolean addWorker (int wrId, int userId);
	
	public int getAbilityId(String name);
	
	public String getAbilityName(int id);
	
	public int insertFeedback(String title, int authorId, int recipientId, int abilityId, int rate, int wrId);
	
	public ArrayList<String> getUserFeedbacks(int recipientId);
	
	public Feedback getFeedback(String title);
	
	public float calculateRating(int userId, int abilityId);
	
	public ArrayList<User> findSuggestion(int reqId, int userId);
	
	public int getSuggested(int reqId);
	
	public ArrayList<Integer> getNewFriendReqId(int id);
	
	public boolean checkFriendship(int user1, int user2);
	
	public int removeUserAbility(int userId, String abilityName);

}
